/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __XOS_COMPRESS_SRC_IMPL_COMPRESS_MGR_H__
#define __XOS_COMPRESS_SRC_IMPL_COMPRESS_MGR_H__

namespace xos_compress
{

    class mgr : public i_compress_mgr
    {
    public:
        typedef xos::release_impl< mgr > T;

    public:
        mgr();
        ~mgr();

	public:
        static int static_init( xos_container::i_container* pContainer, i_compress_mgr** ppv );
        static xos_container::i_container* container();
        static xos_common::i_alloc* alloc();
        static mgr* get();

	public:
		// 
		// create objects
		// 
		int create( enumObjType enumType, void ** ppv );
        i_protocol* protocol();
        i_compress* bzip2();
        i_compress* lzma();
        i_compress* zlib();

    public:
        int put_back_to_pool();
        int init();
        int term();
    };

} // xos_compress

#endif // __XOS_COMPRESS_SRC_IMPL_COMPRESS_MGR_H__
